import service from "..";
export function getArticles(data) {
    return service({
        method: "get",
        url: "/getArticles",
        params: {
            page:data.page,pagesize:data.pagesize
        }
    })
}
export function getArticle_Count() {
    return service({
        method: "get",
        url: "/getArticle_Count",
    })
}

export function postArticle(artdata) {
    return service({
        method: "post",
        url: "/postArticle",
        data:{style:artdata[0],title:artdata[1],url_link:artdata[2],imgurl:artdata[3],body:artdata[4]}
    })
}
export function searchArticle(txt) {
    console.log(txt);
    return service({
        method: "get",
        url: "/searchArticle",
        params:{saerch_txt:txt}
    })
}

export function modifyArticle(artdata) {
    return service({
        method: "post",
        url: "/modifyArticle",
        data:{style:artdata[0],title:artdata[1],url_link:artdata[2],imgurl:artdata[3],body:artdata[4],newBg:artdata[5],id:artdata[6]}
    })
}
export function Article_Show(id) {
    return service({
        method: "get",
        url: "/getArticle_Show",
        params:{id}
    })
}
